# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo09
# Description:
# Author:       98745
# Date:         2019/3/7
#-------------------------------------------------------------------------------

import re
s='12-a-abc54-a-xyz---78-A-ytr'
r=re.findall(r'\d\d-a-[a-z]{3}',s)
print(r)
r=re.findall(r'(\d\d)-a-([a-z]{3})',s)
print(r)
r=re.findall(r'\d\d-a-[a-z]{3}',s,re.I)
print(r)
r=re.findall(r'(\d\d)-a-([a-z]{3})',s,re.I)
print(r)
r=re.finditer(r'(\d\d)-a-([a-z]{3})',s,re.I)
for g in r:
    print(g.group(),end='<')
    g1=g.groups()
    for i in g1:
        print(i,end=' ')
    print('>')